package com.helen.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author yanghl
 * @Description:
 * @date 2022/8/6 16:15
 */
@Configuration
public class MySelfRule {

    @Bean
    public IRule myRule(){

        // 负载均衡机制改为随机
        return new RandomRule();
    }
}
